from selenium.webdriver.common.by import By

class UserDashboardLactor:
    #available credit
    available_credit_ele = (By.XPATH, '(//*[contains(@class,"money")])[2]')
    credit_limit_ele = (By.XPATH, '(//*[contains(@class,"num")])[3]')
    available_bal_ele = (By.XPATH, '(//*[contains(@class,"money")])[1]')
    #可用信控百分比
    available_scale_ele = (By.XPATH, '(//*[contains(@class,"money")])[1]')
    add_funds_btn = (By.XPATH, '//*[text()="Add Funds"]/ancestor::button')
    add_funds_title = (By.XPATH, '(//div[@class="antd4-space-item"])[1]/div')
    DashboardTab = (By.CSS_SELECTOR, 'li[path="/work_bench/dashboard"]')
    #欢迎信息
    welcome_info_ele = (By. XPATH, '//div[@class="welcome-wrap___3JeaX"]/span[1]')
    person_addfund_ele = (By.XPATH, '//*[text()="Add Funds"]/ancestor::button')
    ##lastest Info展示栏的时间
    lastestInfo_time_ele = (By.XPATH, '//div[@class="messageTime___2-tXb"]')
    lastestInfo_more_ele = (By.CSS_SELECTOR, '[href="/work_bench/messageCenter/list"]')
    lastestInfo_title = (By.XPATH, '//div[@class="informationHeader___2itLl"]')
    ##All Notifications页面title
    all_noti_title = (By.XPATH, '//*[text()="All Notifications"]')
    ##Recently Used Product
    recent_usedprod_title = (By.XPATH, '//div[@class="item-wrap___3OaYu"]/div[1]')
    used_prod_ele = (By.XPATH, '//*[@class="productName___21QLV"]')
    ###悬浮的region id
    region_id_ele = (By.CSS_SELECTOR, '[class="regionItem___2l0Z8 regionNumberItem___haOeh"]')
    ##currently in use标题
    in_use_ele = (By.XPATH, '//div[@class="myProductsHeader___10nEI"]/div[1]')
    product_ele = (By.XPATH, '(//div[@class="myProductsCard___G5TO7"])[1]')
    ##lasest info第一条消息title，可链接到消息详情
    #first_info_ele = (By.XPATH, '(//div[@class="messageTitle___-FV7L"])[1]')
    first_info_ele = (By.XPATH, '(//span[@class="message-title-label___2X_iv"])[1]')

    ##消息弹框消息的标题
    info_title_ele = (By.CSS_SELECTOR, '[class="titleContentFirst___3AG72"]')

    # Frozen Balance栏标题Frozen Balance (IDR)
    frozen_balance_title = (By.XPATH, '(//*[@class="item-content___1ejPy"])[5]/div/div/div[1]/div/div/div')
    # 冻结金额数目0.00
    frozen_balance_num = (By.XPATH, '(//div[@class="item-content___1ejPy"])[5]/div/div/div[2]/div/span')

    # Currently in Use栏标题Currently in Use
    currently_use_title = (By.XPATH, '//*[@class="myProducts___2wjnK"]/div/h1')
    # Currently in Use栏标题的Elastic Compute Service
    currently_ecs_title = (By.XPATH, '//*[@class="myProducts___2wjnK"]/div[2]/div/div/div[1]/div[2]')
    # Currently in Use栏标题的RDS for MySQL
    currently_rds_mysql_title = (By.XPATH, '//*[@class="myProducts___2wjnK"]/div[2]/div[2]/div/div[1]/div[2]')
    # Currently in Use栏标题的VPN Gateways
    currently_vpn_gateways_title = (By.XPATH, '//*[@class="myProducts___2wjnK"]/div[2]/div[4]/div/div[1]/div[2]')

    # Credit Account栏的Increase Credit Limit按钮
    increase_credit_limit_btn = (By.XPATH, '//*[@class="item-wrap___7A7ur"]/div/div/div[2]/div/div/button/span')
    # Increase Credit Limit弹框标题
    increase_credit_limit_box_title = (By.CSS_SELECTOR, '[class="antd4-modal-title"]')
    # Increase Credit Limit弹框Total Credit Limit (IDR)标题
    total_credit_limit_title = (By.XPATH, '//*[@class="antd4-modal-body"]/form/div[1]/div/label')
    # Increase Credit Limit弹框Add Credit Limit to标题
    add_credit_limit_box_title = (By.XPATH, '//*[@class="antd4-modal-body"]/form/div[2]/div/label')

    # dashboard页面的现有可用余额金额
    dashboard_total_credit_limit = (By.XPATH, '(//*[@class="money___NHRkN"])[1]/span')
    # dashboard页面的Increase Credit Limit弹框页面的现有可用余额金额
    dashboard_box_total_credit_limit = (By.XPATH, '(//*[@class="form-money___2NuLd"])[1]')
    # Increase Credit Limit弹框页面的可输入的结转金额3,244,444,446~16,222,222,225
    dashboard_box_add_credit_limit = (By.XPATH, '(//*[@class="antd4-input-number-input-wrap"])[1]/input')

    # 资源失效提醒标题Resources expire within 7 days
    dashboard_resources_expire_title = (By.XPATH, '(//*[@class="item-content___QE14L"])[1]/div[1]')
    # 资源失效提醒热区按钮
    dashboard_resources_expire_btn = (By.XPATH, '(//*[@class="item-content___QE14L"])[1]/div[2]')
    # My Resources页面
    my_resources_page = (By.CSS_SELECTOR, '[class="cre-page-container-header-panel"]')
    # Critical标题Critical
    dashboard_critical_title = (By.XPATH, '(//*[@class="item-content___QE14L"])[2]/div[1]')
    # Critical热区按钮
    dashboard_critical_btn = (By.XPATH, '(//*[@class="item-content___QE14L"])[2]/div[2]')
    # Warning标题Warning
    dashboard_warning_title = (By.XPATH, '(//*[@class="item-content___QE14L"])[3]/div[1]')
    # Warning热区按钮
    dashboard_warning_btn = (By.XPATH, '(//*[@class="item-content___QE14L"])[3]/div[2]')
    # 首页Dashboard栏标题按钮
    dashboard_title_btn = (By.XPATH, '(//*[@class="cre-menu-layer-1"])[1]')
    # Resources expire within 7 days：跳转到my resource页面的过期数据
    my_resource_expire_data = (By.XPATH, '(//*[@class="resourceTable___7HrB6"])/div/div/div/ul/li[1]')
    # Critical：跳转到my resource页面的过期数据
    my_resource_critical_data = (By.XPATH, '(//*[@class="resourceTable___7HrB6"])/div/div/div/ul/li[1]')
    # Warning：跳转到my resource页面的过期数据
    my_resource_warning_start_data = (By.XPATH, '(//*[@class="resourceTable___7HrB6"])/div/div/div/ul/li[1]')
    # Warning：跳转到my resource页面的过期结束日期
    my_resource_warning_end_date = (By.XPATH, '(//*[@class="antd4-picker-input"])[1]/input')
    # 失效提醒资源数为0时，跳转到my resource页面No Data描述
    my_resource_no_data_dsc = (By.CSS_SELECTOR, '[class="antd4-empty-description"]')







